﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Weapp.Data.Entities;

namespace Weapp.Data.Mappers
{
    public class SizeCategoryMapper : EntityTypeConfiguration<SizeCategory>
    {
        public SizeCategoryMapper()
        {
            this.ToTable("SizeCategories");

            this.HasKey(c => c.SizeCategoryId);
            this.Property(c => c.SizeCategoryId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(c => c.SizeCategoryId).IsRequired();

            this.Property(c => c.Name).IsRequired();

            this.Property(c => c.AttackAndArmorClassModifier).IsRequired();

            this.Property(c => c.SpecialAttacksModifier).IsOptional();

            this.Property(c => c.MinHeightOrLength).IsRequired();

            this.Property(c => c.MaxHeightOrLength).IsOptional();

            this.Property(c => c.MinWeight).IsRequired();

            this.Property(c => c.MaxWeight).IsOptional();

            this.Property(c => c.Space).IsRequired();

            this.Property(c => c.NaturalReachTall).IsRequired();

            this.Property(c => c.NaturalReachLong).IsRequired();

            this.Property(c => c.BipedCarryingCapacityMultiplier).IsRequired();

            this.Property(c => c.QuadrupedCarryingCapacityMultiplier).IsRequired();

        }
    }
}
